
<%@page contentType="text/html" pageEncoding="windows-1252"%>
<%@page import="java.sql.SQLException"%>
<%
	try
	{
%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="windows-1252">
		<title>Bootstrap, from Twitter</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="">
		<meta name="author" content="">

		<!-- Le styles -->
		<link href="styles/bootstrap.css" rel="stylesheet">
		<style type="text/css">
			body {
				padding-top: 60px;
				padding-bottom: 40px;
			}
			.sidebar-nav {
				padding: 9px 0;
			}
		</style>
	</head>
	<body>
		<!--Barra Superiore-->
		<div class="navbar navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container-fluid">
					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</a>
					<a class="brand" href="#">Amministrator</a>
					<div class="nav-collapse pull-right">
						<ul class="nav">
							<li><a href="#about">Help-Desk</a></li>
							<li>
								<form action="Logout" method="post">
									<button class="btn btn-primary btn-small">Sign out</button>
								</form>
							</li>
						</ul>
					</div>
					<div class="nav-collapse">
						<ul class="nav">
							<li class="active"><a href="#">Home</a></li>
						</ul>
					</div><!--/.nav-collapse -->
				</div>
			</div>
		</div>
		<div class="container-fluid">
			<div class="row-fluid">
				<div >
					<div class="hero-unit">
						<h1>Title Page<br /><br /></h1>
						<p>Spiegazione di cosa si deve fare</p>
						<p><a class="btn btn-primary btn-large">Action</a></p>
					</div>
					<div class="row-fluid">
						<div class="span3">
							<div class="thumbnail" style="width:350px; height:250px; padding-right: 4px;">
								<a href="estimate.jsp?IdPreventive=<%=trip_ID%>" class="thumbnail" style="width:340px; height:200px;">
									<table>
										<tr>
											<td rowspan="2" width="150" height="200">
												<img class="pagination-centered" src="http://placehold.it/130x180">
											</td>
											<td width="210" height="50" style="padding-top:8px;">
												<h4><%=last_name%> <%=first_name%></h4>
												Student's id:<%=resultStudent.getInt( "student" )%>
												<br />
												Mission's id:<%=trip_ID%>                                                                                    
											</td>
										</tr>
										<tr>
											<td>
												The destination is:<br />
												<strong><%=resultStudent.getString( "Planned_destination" )%></strong>  <br />
												and the reason is:<br />
												<strong><%=resultStudent.getString( "Planned_Reason_for_Travel" )%></strong>. 
											</td>
										</tr>
									</table> 
								</a> 
								<a class="btn btn-success" data-toggle="modal"  href="#AcceptModal<%=indice%>" style="margin-top: 8px;"><i class="icon-thumbs-up icon-white"></i> Accept</a> 
								<a class="btn btn-danger" data-toggle="modal" href="#RefuseModal<%=indice%>" style="margin-top: 8px;"><i class="icon-trash icon-white"></i> Refuse</a>
								<!--MODAL che appare quando si clicca su Accept-->
								<div class="modal hide fade" id="AcceptModal<%=indice%>">

									<div class="modal-header">
										<button class="close" data-dismiss="modal">x</button>
										<h3>Are You Sure?</h3>
									</div>
									<div class="modal-body">
										<p>Click "Save Changes" to ACCEPT the trip <%=trip_ID%>, Close instead.</p>
									</div>
									<div class="modal-footer">
										<table>
											<tr>                                                    
												<td>
													<form action="ManagerModify" method="post">
														<input name="trip_id" type="hidden" value="<%=trip_ID%>"/>
														<input name="approvato" type="hidden" value="1"/>
														<button class="btn btn-primary btn-success"><i class="icon-thumbs-up icon-white"></i> Save Changes</button>
													</form>
												</td>
												<td>
													<button class="btn" data-dismiss="modal">Close</button>
												</td>
											</tr>
										</table>
									</div>
								</div>                                            
								<!--MODAL che appare quando si clicca su Refuse-->
								<div class="modal hide fade" id="RefuseModal<%=indice%>">
									<div class="modal-header">
										<button class="close" data-dismiss="modal">x</button>
										<h3>Are You Sure?</h3>
									</div>
									<div class="modal-body">
										<p>Click "Save Changes" to REFUSE the trip <%=trip_ID%>, Close instead.</p>
									</div>
									<div class="modal-footer">
										<form action="ManagerModify" method="post">
											<textarea name="noteRefuse"></textarea><br />
											<table>
												<tr>                                                    
													<td>
														<input name="trip_id" type="hidden" value="<%=trip_ID%>"/>
														<input name="approvato" type="hidden" value="0"/>
														<button class="btn btn-primary btn-danger"><i class="icon-trash icon-white"></i> Save Changes</button>
													</td>
													<td>
														<button class="btn" data-dismiss="modal">Close</button>
													</td>
												</tr>
											</table>
										</form>
									</div>
								</div>
							</div>
						</div>
						<div >              
							<p><a class="btn" href="#">Back</a></p>
						</div>
					</div>
				</div>
			</div>
			<hr />
			<footer>
				<p>&copy; 2012 Startup</p>
			</footer>
		</div><!--/.fluid-container-->
		<!-- Il javascript -->
		<script src="js/jquery.js"></script>
		<script src="js/bootstrap.js"></script>
	</body>
</html>
<%
	}
	catch( RuntimeException runtimeException )
	{
		if( runtimeException.getClass().equals( NullPointerException.class ) )
		{
			runtimeException = new NullPointerException( "The session has timed out:<br />" + "" +
														 "try reloading page.<br />" +
														 "If the problem persists, please report it to the administration." );
		}
		request.setAttribute( "exception", runtimeException );
		request.getRequestDispatcher( "errorPage.jsp" ).forward( request, response );
	}
%>